﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace ChromaticQFX
{
    public class QFXNormalization
    {
        string _ItemName = "";
        [Description("")]
        public string ItemName { get { return _ItemName; } set { _ItemName = value; } }

        Decimal _DailyAverage = 0.0m;
        [Description("")]
        public Decimal DailyAverage { get { return _DailyAverage; } set { _DailyAverage = value; } }

        Decimal _MonthlyEstimation = 0.0m;
        [Description("")]
        public Decimal MonthlyEstimation { get { return _MonthlyEstimation; } set { _MonthlyEstimation = value; } }

        Decimal _YearlyEstimation = 0.0m;
        [Description("")]
        public Decimal YearlyEstimation { get { return _YearlyEstimation; } set { _YearlyEstimation = value; } }

        public QFXNormalization()
        {
        }

        public QFXNormalization(string ItemName, Decimal DailyAverage, Decimal MonthlyEstimation, Decimal YearlyEstimation)
        {
            this.ItemName = ItemName;
            this.DailyAverage = DailyAverage;
            this.MonthlyEstimation = MonthlyEstimation;
            this.YearlyEstimation = YearlyEstimation;
        }
    }

    public class NormalizationComparer : IComparer<QFXNormalization>
    {
        public int Compare(QFXNormalization norm1, QFXNormalization norm2)
        {
            return norm1.DailyAverage.CompareTo(norm2.DailyAverage);
        }
    }
}
